3e6377b24eQqYMsDi9XrFkIgTzZ47A tools/balloon/Makefile
3e6377d6eiFjF1hHIS6JEIOFk62xSA tools/balloon/README
3e6377dbGcgnisKw16DPCaND7oGO3Q tools/balloon/balloon.c
+3fbe2f12OPAkzIUtumU3wRAihnhocQ tools/examples/xi_createlinuxdom.py
+3fbe2f12dZbmXLlgQdMgkmnSUj23AQ tools/examples/xi_destroydom.py
+3fbe2f12ltvweb13kBSsxqzZDAq4sg tools/examples/xi_listdoms.py
+3fbe2f12Bnt8mwmr1ZCP6HWGS6yvYw tools/examples/xi_stopdom.py
3f776bd2Xd-dUcPKlPN2vG89VGtfvQ tools/misc/Makefile
3f6dc136ZKOjd8PIqLbFBl_v-rnkGg tools/misc/miniterm/Makefile
3f6dc140C8tAeBfroAF24VrmCS4v_w tools/misc/miniterm/README
3f13d81e6Z6806ihYYUw8GVKNkYnuw tools/misc/xen_nat_enable.README
3f1668d4F29Jsw0aC0bJEIkOBiagiQ tools/misc/xen_read_console.c
3f87ba90EUVPQLVOlFG0sW89BCwouQ tools/misc/xen_refresh_dev.c
-3fbe2f12OPAkzIUtumU3wRAihnhocQ tools/misc/xi_createlinuxdom.py
-3fbe2f12dZbmXLlgQdMgkmnSUj23AQ tools/misc/xi_destroydom.py
-3fbe2f12ltvweb13kBSsxqzZDAq4sg tools/misc/xi_listdoms.py
-3fbe2f12Bnt8mwmr1ZCP6HWGS6yvYw tools/misc/xi_stopdom.py
3fbca441SjQr8vJwTQIgH1laysaWog tools/xc/Makefile
3fbba6dbDfYvJSsw9500b4SZyUhxjQ tools/xc/lib/Makefile
3fbba6dbEVkVMX0JuDFzap9jeaucGA tools/xc/lib/libxc_bvtsched.c
-#
+
# Grand Unified Makefile for Xen.
#
-# Keir Fraser, 6/5/2003
-#
# Builds everything except Xenolinux:
# cd xenolinux-<version>-sparse
# ./mkbuildtree <build dir>
# cd <build dir> && make oldconfig && make dep && make bzImage
# (<build dir> should be a vanilla linux tree with matching version)
-#
-# If you get errors in tools/domctl or tools/vdmanager, then you need
-# the latest Java 2 SDK on your execution path: <http://java.sun.com>
-# Also, you will need Apache's 'ant' build tool: <http://ant.apache.org>
-#
-# If you received this source as part of a Xen release, you should find
-# that appropriate versions of the build tools are already installed in
-# the initial system setup.
all:
$(MAKE) -C xen
$(MAKE) -C xen install
$(MAKE) -C tools install
+dist: all
+ $(MAKE) -C xen dist
+ $(MAKE) -C tools dist
+
clean:
$(MAKE) -C xen clean
$(MAKE) -C tools clean
http://www.bitmover.com/download with username 'bitkeeper' and
password 'get bitkeeper'.
-Then install it and run:
-# cd /
+Then install the tools and then run:
# bk clone bk://xen.bkbits.net/xeno-1.1.bk
Under your current directory, a new directory named 'xeno-1.1.bk' has
been created, which contains all the source codes for Xen and
-XenoLinux. Here we suppose you put it under '/'.
+XenoLinux.
To get newest changes to the repository, run
-# cd /xeno-1.1.bk
+# cd xeno-1.1.bk
# bk pull
To build Xen manually:
-# cd /xeno-1.1.bk/xen
+# cd xeno-1.1.bk/xen
# make clean
# make
directory. This is the ELF 32-bit LSB executable file of Xen. You
can also find a gzip version, named 'image.gz'.
-Hint: There is a 'make install' rule which also and then copies it to
-../../install ; if this suits your setup, go for it.
+To install the built files on your Xenoserver under /usr, type 'make
+install' at the root of the BK repository. You will need to be root to
+do this!
+
+Hint: There is also a 'make dist' rule which copies built files to an
+install directory just outside the BK repo; if this suits your setup,
+go for it.
Build XenoLinux
least Python v2.2.
'make install' in the tools directory will place executables and
-libraries in an install directory immediately outside you local
-repository. NOTE: the installation of the Python modules may need root
-privileges if you are not using a personal installation of Python.
+libraries in /usr/bin and /usr/lib. You will need to be root to do this!
+
+As noted earlier, 'make dist' installs files to a local 'install'
+directory just outside the BK repository. These files will then need
+to be installed manually onto the Xenoserver.
Installation
by xen_read_console running in Domain 0 and output are printed out to
the standard output.
-Now edit the installed xi_createlinuxdom.py script to your taste. This
+Now edit the tools/examples/xi_createlinuxdom.py script to your taste. This
should then be executed as root to create a new domain.
You should be able to see XenoLinux boot message on standard output
==============================
You can see a list of existing domains with:
-# xi_listdoms.py
+# tools/examples/xi_listdoms.py
In order to stop a domain, you use:
-# xi_stopdom.py <domain_id>
+# tools/examples/xi_stopdom.py <domain_id>
To destroy a domain use ('force' causes an immediate destruction
without waiting for the guest OS to shut down cleanly):
-# xi_destroydom.py <domain_id> [force]
+# tools/examples/xi_destroydom.py <domain_id> [force]
Other Control Tasks using Python
$(MAKE) -C xc install
$(MAKE) -C misc install
+dist: all
+ $(MAKE) -C balloon dist
+ $(MAKE) -C xc dist
+ $(MAKE) -C misc dist
+
clean:
$(MAKE) -C balloon clean
$(MAKE) -C xc clean
$(CC) -O2 -Wall -o $(TARGET) balloon.c
install: $(TARGET)
+ mkdir -p /usr/bin
+ cp -a $(TARGET) /usr/bin
+
+dist: $(TARGET)
mkdir -p ../../../install/bin
cp -a $(TARGET) ../../../install/bin
--- /dev/null
+#!/usr/bin/env python
+
+#
+# Example script for creating and building a new Linux guest OS for Xen.
+#
+
+import Xc, XenoUtil, sys, os
+
+# Variable declaration. Set these up properly later on, as needed.
+nfsserv = nfspath = root_partn = usr_partn = ""
+
+# STEP 1. Specify kernel image file.
+image = "FULL_PATH_TO_IMAGE"
+
+# STEP 2. Specify IP address, netmask and gateway for the new domain.
+ipaddr = "ADDRESS"
+netmask = XenoUtil.get_current_ipmask()
+gateway = XenoUtil.get_current_ipgw()
+
+# STEP 3a. Specify NFS server and path to rootfs (only needed for network boot)
+nfsserv = "ADDRESS"
+nfspath = "FULL_PATH_TO_ROOT_DIR"
+
+# STEP 3b. Specify root (and possibly /usr) on local disc (if not NFS booting)
+#root_partn = "/dev/sda2"
+#usr_partn = "/dev/sda6"
+
+# STEP 4. Check that the following cmdline setup is to your taste.
+cmdline = "ip="+ipaddr+":"+nfsserv+":"+gateway+":"+netmask+"::eth0:off"
+if root_partn:
+ # Boot from local disc. May specify a separate /usr.
+ cmdline = cmdline + " root="+root_partn+" ro"
+ if usr_partn:
+ " usr="+usr_partn
+elif nfsserv:
+ # NFS boot
+ cmdline = cmdline + " root=/dev/nfs"
+ cmdline = cmdline + " nfsroot="+nfspath
+
+if root_partn:
+ root_info = XenoUtil.lookup_blkdev_partn_info(root_partn)
+ if not root_info:
+ print "Could not obtain info on partition '" + root_partn + "'"
+ sys.exit()
+
+if usr_partn:
+ usr_info = XenoUtil.lookup_blkdev_partn_info(usr_partn)
+ if not usr_info:
+ print "Could not obtain info on partition '" + usr_partn + "'"
+ sys.exit()
+
+if not os.path.isfile( image ):
+ print "Image file '" + image + "' does not exist"
+ sys.exit()
+
+xc = Xc.new()
+
+id = xc.domain_create()
+if id <= 0:
+ print "Error creating domain"
+ sys.exit()
+
+if xc.linux_build( dom=id, image=image, cmdline=cmdline ):
+ print "Error building Linux guest OS"
+ xc.domain_destroy ( dom=id )
+ sys.exit()
+
+if root_partn:
+ if xc.vbd_create( dom=id, vbd=root_info[0], writeable=1 ):
+ print "Error creating root VBD"
+ xc.domain_destroy ( dom=id )
+ sys.exit()
+ if xc.vbd_add_extent( dom=id,
+ vbd=root_info[0],
+ device=root_info[1],
+ start_sector=root_info[2],
+ nr_sectors=root_info[3] ):
+ print "Error populating root VBD"
+ xc.domain_destroy ( dom=id )
+ sys.exit()
+
+if usr_partn:
+ if xc.vbd_create( dom=id, vbd=usr_info[0], writeable=0 ):
+ print "Error creating usr VBD"
+ xc.domain_destroy ( dom=id )
+ sys.exit()
+ if xc.vbd_add_extent( dom=id,
+ vbd=usr_info[0],
+ device=usr_info[1],
+ start_sector=usr_info[2],
+ nr_sectors=usr_info[3] ):
+ print "Error populating usr VBD"
+ xc.domain_destroy ( dom=id )
+ sys.exit()
+
+XenoUtil.setup_vfr_rules_for_vif( id, 0, ipaddr )
+
+if xc.domain_start( dom=id ):
+ print "Error starting domain"
+ xc.domain_destroy ( dom=id )
+ sys.exit()
--- /dev/null
+#!/usr/bin/env python
+
+#
+# Destroy specified domain.
+#
+
+import Xc, sys, re
+
+xc = Xc.new()
+
+if len(sys.argv) < 2:
+ print "Specify a domain identifier"
+ sys.exit()
+
+if (len(sys.argv) > 2) and re.match( 'force', sys.argv[2] ):
+ xc.domain_destroy( dom=int(sys.argv[1]), force=0 )
+else:
+ xc.domain_destroy( dom=int(sys.argv[1]), force=1 )
--- /dev/null
+#!/usr/bin/env python
+
+#
+# List info on all domains.
+#
+
+import Xc, sys
+xc = Xc.new()
+print xc.domain_getinfo()
+
--- /dev/null
+#!/usr/bin/env python
+
+#
+# Stop execution of specified domain.
+#
+
+import Xc, sys, re
+
+xc = Xc.new()
+
+if len(sys.argv) != 2:
+ print "Specify a domain identifier"
+ sys.exit()
+
+xc.domain_stop( dom=int(sys.argv[1]) )
TARGETS = xen_read_console xen_refresh_dev xen_cpuperf
INSTALL = $(TARGETS) xen-mkdevnodes xen_nat_enable xen-clone
-INSTALL += xi_createlinuxdom.py xi_destroydom.py xi_listdoms.py
-INSTALL += xi_stopdom.py
all: $(TARGETS)
$(MAKE) -C miniterm
install: all
+ mkdir -p /usr/bin
+ cp -a $(INSTALL) /usr/bin
+ chmod 755 /usr/bin/xen-mkdevnodes
+ chmod 755 /usr/bin/xen_nat_enable
+ chmod 755 /usr/bin/xen-clone
+ $(MAKE) -C miniterm install
+
+dist: all
mkdir -p ../../../install/bin
cp -a $(INSTALL) ../../../install/bin
chmod 755 ../../../install/bin/xen-mkdevnodes
chmod 755 ../../../install/bin/xen_nat_enable
chmod 755 ../../../install/bin/xen-clone
- chmod 755 ../../../install/bin/xi_createlinuxdom.py
- chmod 755 ../../../install/bin/xi_destroydom.py
- chmod 755 ../../../install/bin/xi_listdoms.py
- chmod 755 ../../../install/bin/xi_stopdom.py
- $(MAKE) -C miniterm install
+ $(MAKE) -C miniterm dist
clean:
$(RM) *.o $(TARGETS)
all: miniterm
install: all
+ cp -a miniterm /usr/bin/
+
+dist: all
cp -a miniterm ../../../../install/bin/
clean:
# build and install Xen and tools
cd ${DEST_BK_REP}
-make install
+make dist || make install
# Turn linux into xenolinux then build it
cd xenolinux-${LINUX_VER}-sparse
make oldconfig
make dep
make bzImage
-make install
+make dist || make install
make modules
make modules_install
cd ..
+++ /dev/null
-#!/usr/bin/python
-
-#
-# Example script for creating and building a new Linux guest OS for Xen.
-#
-
-import Xc, XenoUtil, sys, os
-
-# Variable declaration. Set these up properly later on, as needed.
-nfsserv = nfspath = root_partn = usr_partn = ""
-
-# STEP 1. Specify kernel image file.
-image = "FULL_PATH_TO_IMAGE"
-
-# STEP 2. Specify IP address, netmask and gateway for the new domain.
-ipaddr = "ADDRESS"
-netmask = XenoUtil.get_current_ipmask()
-gateway = XenoUtil.get_current_ipgw()
-
-# STEP 3. Specify NFS server and path to rootfs (only needed for network boot)
-nfsserv = "ADDRESS"
-nfspath = "FULL_PATH_TO_ROOT_DIR"
-
-# STEP 4. Specify root (and possibly /usr) on local disc (if not NFS booting)
-#root_partn = "/dev/sda2"
-#usr_partn = "/dev/sda6"
-
-# STEP 5. Check that the following cmdline setup is to your taste.
-cmdline = "ip="+ipaddr+":"+nfsserv+":"+gateway+":"+netmask+"::eth0:off"
-if root_partn:
- # Boot from local disc. May specify a separate /usr.
- cmdline = cmdline + " root="+root_partn+" ro"
- if usr_partn:
- " usr="+usr_partn
-elif nfsserv:
- # NFS boot
- cmdline = cmdline + " root=/dev/nfs"
- cmdline = cmdline + " nfsroot="+nfspath
-
-if root_partn:
- root_info = XenoUtil.lookup_blkdev_partn_info(root_partn)
- if not root_info:
- print "Could not obtain info on partition '" + root_partn + "'"
- sys.exit()
-
-if usr_partn:
- usr_info = XenoUtil.lookup_blkdev_partn_info(usr_partn)
- if not usr_info:
- print "Could not obtain info on partition '" + usr_partn + "'"
- sys.exit()
-
-if not os.path.isfile( image ):
- print "Image file '" + image + "' does not exist"
- sys.exit()
-
-xc = Xc.new()
-
-id = xc.domain_create()
-if id <= 0:
- print "Error creating domain"
- sys.exit()
-
-if xc.linux_build( dom=id, image=image, cmdline=cmdline ):
- print "Error building Linux guest OS"
- xc.domain_destroy ( dom=id )
- sys.exit()
-
-if root_partn:
- if xc.vbd_create( dom=id, vbd=root_info[0], writeable=1 ):
- print "Error creating root VBD"
- xc.domain_destroy ( dom=id )
- sys.exit()
- if xc.vbd_add_extent( dom=id,
- vbd=root_info[0],
- device=root_info[1],
- start_sector=root_info[2],
- nr_sectors=root_info[3] ):
- print "Error populating root VBD"
- xc.domain_destroy ( dom=id )
- sys.exit()
-
-if usr_partn:
- if xc.vbd_create( dom=id, vbd=usr_info[0], writeable=0 ):
- print "Error creating usr VBD"
- xc.domain_destroy ( dom=id )
- sys.exit()
- if xc.vbd_add_extent( dom=id,
- vbd=usr_info[0],
- device=usr_info[1],
- start_sector=usr_info[2],
- nr_sectors=usr_info[3] ):
- print "Error populating usr VBD"
- xc.domain_destroy ( dom=id )
- sys.exit()
-
-XenoUtil.setup_vfr_rules_for_vif( id, 0, ipaddr )
-
-if xc.domain_start( dom=id ):
- print "Error starting domain"
- xc.domain_destroy ( dom=id )
- sys.exit()
+++ /dev/null
-#!/usr/bin/python
-
-#
-# Destroy specified domain.
-#
-
-import Xc, sys, re
-
-xc = Xc.new()
-
-if len(sys.argv) < 2:
- print "Specify a domain identifier"
- sys.exit()
-
-if (len(sys.argv) > 2) and re.match( 'force', sys.argv[2] ):
- xc.domain_destroy( dom=int(sys.argv[1]), force=0 )
-else:
- xc.domain_destroy( dom=int(sys.argv[1]), force=1 )
+++ /dev/null
-#!/usr/bin/python
-
-#
-# List info on all domains.
-#
-
-import Xc, sys
-xc = Xc.new()
-print xc.domain_getinfo()
-
+++ /dev/null
-#!/usr/bin/python
-
-#
-# Stop execution of specified domain.
-#
-
-import Xc, sys, re
-
-xc = Xc.new()
-
-if len(sys.argv) != 2:
- print "Specify a domain identifier"
- sys.exit()
-
-xc.domain_stop( dom=int(sys.argv[1]) )
$(MAKE) -C lib
$(MAKE) -C py
-install:
+install: all
$(MAKE) -C lib install
$(MAKE) -C py install
+dist: all
+ $(MAKE) -C lib dist
+ $(MAKE) -C py dist
+
clean:
$(MAKE) -C lib clean
$(MAKE) -C py clean
fi
install: all
+ mkdir -p /usr/lib
+ mkdir -p /usr/include
+ cp -a $(LIBS) /usr/lib
+ for i in $(LIBS); do chmod 755 /usr/bin/$i ; done
+ cp -a xc.h /usr/include
+ chmod 644 /usr/include/xc.h
+
+dist: all
mkdir -p ../../../../install/lib
mkdir -p ../../../../install/include
cp -a $(LIBS) ../../../../install/lib
all: ../lib/libxc.a
python setup.py build
-install:
+install: all
python setup.py install
+dist: all
+ mkdir -p ../../../../install/lib/python
+ for i in `find . -name 'Xc.so'` ; do \
+ cp $$i ../../../../install/lib/python/`basename $$i` ; \
+ done
+
clean:
rm -rf build *.pyc *.pyo *.o *.a *~
objdump -D -S $(TARGET) > $(TARGET).s
install: $(TARGET)
+ gzip -f -9 < $(TARGET) > $(TARGET).gz
+ mkdir -p /boot
+ cp -a $(TARGET).gz /boot
+
+dist: $(TARGET)
gzip -f -9 < $(TARGET) > $(TARGET).gz
mkdir -p ../../install/boot
cp -a $(TARGET).gz ../../install/boot/
/* As above, but hyp_events are handled within the hypervisor. */
static inline unsigned long mark_hyp_event(struct task_struct *p, int event)
{
- if ( test_and_set_bit(event, &p->shared_info->events) )
+ if ( test_and_set_bit(event, &p->hyp_events) )
return 0;
smp_mb();
if ( p->state == TASK_INTERRUPTIBLE ) wake_up(p);
@$(MAKEBOOT) xenolinux.gz
install: bzImage
+ mkdir -p /boot
+ cp -a arch/$(ARCH)/boot/xenolinux.gz /boot/xenolinux.gz
+
+dist: bzImage
mkdir -p ../install/boot
cp -a arch/$(ARCH)/boot/xenolinux.gz ../install/boot/xenolinux.gz